from server import *

s = Server('', 8000)
router = s.get_router()

@router.route('/')
def route(header, request, response_headers):
    response_headers['Content-Type'] = 'text/plain'
    return 'hello world'
    
@router.route('/error')
def route(header, request, response_headers):
    raise InternalServerError()
    
@router.route('/redirect')
def route(header, request, response_headers):
    raise Redirect('/')
    
s.start()
